package com.han.design;

/**
 * @author v-taohuang
 * @date 上午12:29 2020/2/24
 */
public class Test {

    public static void main(String[] args) {
        //境外支付
        AbstractStrategyFactory factory = FactoryProducer.getFactory("com.han.design.OuterFactory");
        IPayMent pay = factory.createPay(PayEnum.APPLE.channel);
        pay.pay();

        //国内支付
        factory = FactoryProducer.getFactory("com.han.design.InnerFactory");
        pay = factory.createPay(PayEnum.ALI.channel);
        pay.pay();
    }

}
